#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void GetMemory(char** p, int num)
{
	if (NULL == p && num <= 0)//1
		return;
	*p = (char*)malloc(num);
	return;
} 
int main()
{
	char* str = NULL;
	GetMemory(&str, 80); //2
	if (NULL != str)
	{
		strcpy(&str, "hello"); //3
		printf(str); //4
	} 
	return 0;
}